package com.zrh.jsd.service.studydemo.pattern.Single;

public class SinglePattern {
    private static volatile SinglePattern instance;

    public static SinglePattern getInstance() {
        if(instance == null){
            synchronized (SinglePattern.class){
                if (instance == null){
                    instance = new SinglePattern();
                }
            }
        }
        return instance;
    }
}
